package top.infopub.mgr.flow.service.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import top.infopub.generic.GenericDao;
import top.infopub.generic.GenericServiceImpl;
import top.infopub.mgr.flow.dao.ProcessNodeDao;
import top.infopub.mgr.flow.domain.ProcessNodeDomain;
import top.infopub.mgr.flow.service.ProcessNodeService;
import top.infopub.mgr.flow.vo.ProcessNodeVo;
import top.infopub.model.flow.ProcessNode;


@Service
public class ProcessNodeServiceImpl extends GenericServiceImpl<ProcessNode, String> implements ProcessNodeService {

    @Autowired
    private ProcessNodeDao processNodeDao;

    @Override
    public GenericDao<ProcessNode, String> getDao() {
        return processNodeDao;
    }

    @Override
    public List<ProcessNodeDomain> queryPendingProcNodes(String dealUserId, String srcBizTable) {
        ProcessNode query = new ProcessNode();
        query.setDealUserId(dealUserId);
        query.setSrcBizTable(srcBizTable);
        return processNodeDao.queryPendingProcNodes(query);
    }

    @Override
    public List<ProcessNodeVo> queryAllProcNodes(String processId) {
        return processNodeDao.selectByProcessId(processId);
    }

}